<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    /* switch
     case :满足某个条件，走里面的语句，Tip:在语句后面要加上break关键字
    break;   //结束本次条件判断  中断循环
    */
        var a=4;
        switch(a){
            case 1:
                console.log("等于1");
                break;
            case 2:
                console.log("等于2");
                break;
            default:
                console.log("其他值")
        }
    </script>
</body>
</html>